﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace _0812045
{
    public class OldPaperSprite : BaseSprite
    {
        public OldPaperSprite(Texture2D[] texture)
        {
            texture2d = texture;
            _itexture2d = 0;
            _isFinish = false;
            count = 0;
        }
        int count;
        public Color color;
        public override void Update(GameTime gameTime)
        {
            if (_itexture2d < 9 && count > 2)
            {
                _itexture2d++;
                count = 0;
            }
            if (count <= 2)
                count++;
            if (_itexture2d == 9)
                isFinish = true;
        }
        public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(_texture2d[_itexture2d], new Rectangle (0,0, 900, 500), new Rectangle(0, 0, _texture2d[_itexture2d].Width, _texture2d[_itexture2d].Height), color);
        }
    }
}
